{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "442c9947",
   "metadata": {},
   "source": [
    "# 读取数据和引入模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "6ddb1ecd",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sklearn as sk\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "import xgboost as xgb\n",
    "# from xgboost import XGBClassifier\n",
    "from sklearn.metrics import roc_curve\n",
    "import toad"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "bb84c40c",
   "metadata": {},
   "outputs": [],
   "source": [
    "data_train = pd.read_csv('data_train.csv',index_col = 0) # index_col=0表示以原有数据的第一列(索引为0)当作行索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "f13848cd",
   "metadata": {},
   "outputs": [],
   "source": [
    "x_train = data_train.drop(columns = ['loan_status'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "ade79064",
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train = data_train['loan_status']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "f06b5850",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((26313, 19), (26313,))"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train.shape,y_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "7eee9065",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    19016\n",
       "1     7297\n",
       "Name: loan_status, dtype: int64"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_train.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e5a8250a",
   "metadata": {},
   "outputs": [],
   "source": [
    "data_test = pd.read_csv('data_test.csv',index_col = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "7778136e",
   "metadata": {},
   "outputs": [],
   "source": [
    "x_test = data_test.drop(columns = ['loan_status'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "231ecd9e",
   "metadata": {},
   "outputs": [],
   "source": [
    "y_test = data_test['loan_status']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "7825a90c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((6579, 19), (6579,))"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_test.shape,y_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "787a6f93",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    4777\n",
       "1    1802\n",
       "Name: loan_status, dtype: int64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_test.value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ec2ebf0e",
   "metadata": {},
   "source": [
    "# 模型训练"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "229461bb",
   "metadata": {},
   "source": [
    "##  网格搜索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "f97c630d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 126 candidates, totalling 378 fits\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "(0.7307414585946109,\n",
       " {'learning_rate': 0.01, 'max_depth': 6, 'n_estimators': 400})"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " xgb_param={'max_depth':np.arange(3,10,1),'n_estimators':[300,350,400],'learning_rate':list(np.arange(0.01, 0.3, 0.05))}\n",
    "#树结构最大深度max_depth、树的棵树n_estimators以及学习率learning_rate\n",
    "\n",
    "xgb_gsearch=GridSearchCV(estimator=xgb.XGBClassifier(random_state=0),#, subsample=0.8, colsample_bytree=0.8\n",
    "# subsample：浮点型，用于指定每个决策树模型训练需要的样本数。取值范围为(0～1]，即将该值作为比率乘以总样本数，作为训练单\n",
    "#    个决策树模型的训练样本。增加输入扰动，进而增加模型的多样性。\n",
    "# colsample_bytree：浮点数，取值范围为(0～1]，用于指定每个决策树模型训练需要的特征数，将该值作为比率乘以总特征数后作为训\n",
    "#    练单个决策树模型的训练特征\n",
    "                                param_grid= xgb_param, cv=3,  n_jobs=-1, verbose=2)\n",
    "#scoring='f1',\n",
    "# scoring=None:模型评价标准，默认None,这时需要使用score函数；或者如scoring='roc_auc'，根据所选模型不同，评价准则不同\n",
    "#   (指定损失函数类型)如果是None，则使用estimator的误差估计函数\n",
    "xgb_gsearch.fit(x_train,y_train)\n",
    "\n",
    "xgb_gsearch.best_score_, xgb_gsearch.best_params_"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "71fc2bc3",
   "metadata": {},
   "source": [
    "## 训练模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "0d4785ea",
   "metadata": {},
   "outputs": [],
   "source": [
    "XGB_model = xgb.XGBClassifier(random_state=0, n_jobs=-1, n_estimators=xgb_gsearch.best_params_['n_estimators'],max_depth=\n",
    "     xgb_gsearch.best_params_['max_depth'], learning_rate=xgb_gsearch.best_params_['learning_rate'])\n",
    "# subsample=0.8, colsample_bytree=0.8,\n",
    "XGB_model_fit = XGB_model.fit(x_train, y_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e16921bd",
   "metadata": {},
   "source": [
    "# 预测与评估"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9115ffb5",
   "metadata": {},
   "source": [
    "## 混淆矩阵"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "ef96dc49",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>预测为好</th>\n",
       "      <th>预测为坏</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>标签为好</th>\n",
       "      <td>4576</td>\n",
       "      <td>201</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>标签为坏</th>\n",
       "      <td>1541</td>\n",
       "      <td>261</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      预测为好  预测为坏\n",
       "标签为好  4576   201\n",
       "标签为坏  1541   261"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_pred_test = XGB_model_fit.predict(x_test)\n",
    "\n",
    "y_pred_train = XGB_model_fit.predict(x_train)   #计算PSI\n",
    "\n",
    "cnf_matrix = sk.metrics.confusion_matrix(y_test,y_pred_test)\n",
    "cnf_matrix = pd.DataFrame(cnf_matrix,index = [\"标签为好\",\"标签为坏\"],columns = ['预测为好','预测为坏'])\n",
    "cnf_matrix"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9ca3d75d",
   "metadata": {},
   "source": [
    "## 评估指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "6dabe96c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>准确率</th>\n",
       "      <th>AUC</th>\n",
       "      <th>KS值</th>\n",
       "      <th>PSI</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>XGBoost</th>\n",
       "      <td>0.735218</td>\n",
       "      <td>0.707608</td>\n",
       "      <td>0.309506</td>\n",
       "      <td>0.000435</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              准确率       AUC       KS值       PSI\n",
       "XGBoost  0.735218  0.707608  0.309506  0.000435"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "accuracy=sk.metrics.accuracy_score(y_test,y_pred_test)\n",
    "\n",
    "y_score=XGB_model_fit.predict_proba(x_test)[:,1]\n",
    "auc=sk.metrics.roc_auc_score(y_test,y_score)\n",
    "\n",
    "fpr,tpr,threshold=sk.metrics.roc_curve(y_test,y_score)\n",
    "ks=max([trp_ - fpr_ for trp_, fpr_ in zip(tpr, fpr)])\n",
    "\n",
    "psi=toad.metrics.PSI(y_pred_train,y_pred_test)\n",
    "\n",
    "estimate=pd.DataFrame([[accuracy,auc,ks,psi]],columns=['准确率','AUC','KS值','PSI'])\n",
    "estimate.index = ['XGBoost']\n",
    "estimate"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "276a26d5",
   "metadata": {},
   "source": [
    "## ROC和KS图像"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "b53c7ba6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAacAAAEYCAYAAAD4czk4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNp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FafHxUKNYS7HqsFPHt+zQQA2mlBs0qAQeAOH4dHOtYapvRnD+wttbT5wYovmZAAtCv1P1RQHSJ71cCIyz6HTbk10XWvYFD7t+nLX6H7u1qYlzDjgr079C9/xZceHA3IO9Bux8PTjs2nHB8OPFYKfGaATtm/PZDlPMDjgL2YszgeNp93yRgkvt7Bbznfnwb0Otiz7UgvsnAaWCz+9969/0t3b/4LcAOf8XnYYwPuGPYgjEw3e9izw10fO7bE4CppZ4XkN8hxifQY0A+xie7iVa9B+1+PDjt2HDC8eGkY6XE6wX0mJHyRUIIIWxHKkQIIYSwHUlOQgghbEeSkxBCCNuR5CSEEMJ2JDkJIYSwHUlOQgghbEeSkxBCCNv5f3XRPQYulBiaAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "y_proba = XGB_model_fit.predict_proba(x_test)\n",
    "fig,(axe1,axe2) = plt.subplots(1,2,sharey = True)    # 返回值fig： matplotlib.figure.Figure 对象 \n",
    "                                                    #ax：子图对象（ matplotlib.axes.Axes）或者是他的数组     \n",
    "# subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,subplot_kw=None, gridspec_kw=None, **fig_kw)\n",
    "# nrows，ncols：子图的行列数   sharex, sharey：设置为 True 或者 ‘all’ 时，所有子图共享 x 轴或者 y 轴，\n",
    "# 设置为 False or ‘none’ 时，所有子图的 x，y 轴均为独立，设置为 ‘row’ 时，每一行的子图会共享 x 或者 y 轴，\n",
    "# 设置为 ‘col’ 时，每一列的子图会共享 x 或者 y 轴。\n",
    "\n",
    "for i in range(len(np.unique(y_test))):\n",
    "    fpr,tpr,thresholds = roc_curve(y_test,y_proba[:,i],pos_label = i)\n",
    "axe1.plot(fpr,tpr)\n",
    "axe1.plot([0,1],[0,1])\n",
    "axe1.set_title('ROC')\n",
    "axe2.plot(1 - thresholds,tpr,label = 'TPR')\n",
    "axe2.plot(1 - thresholds,fpr,label = 'FPR')\n",
    "plt.legend()   #plt.legend（）函数主要的作用就是给图加上图例\n",
    "plt.xlim(0,)   #刻度范围,若不设置，则坐标轴的刻度范围取决于数据中的最大值和最小值,plt.xlim(x.min() - 1.5, x.max() + 1.5)\n",
    "axe2.set_title('KS')\n",
    "plt.tight_layout() # tight_layout会自动调整子图参数，使之填充整个图像区域。这是个实验特性，\n",
    "                    # 可能在一些情况下不工作。它仅仅检查坐标轴标签、刻度标签以及标题的部分\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "51cd1bf4",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
